#pragma once

#include "Team.h"

inline bool TeamComparisonName(const Team* const i_a, const Team* const i_b)
{
	return i_a->GetName() < i_b->GetName();
}

inline bool TeamComparisonHistoryTotalPodium(const Team* const i_a, const Team* const i_b)
{
	return i_a->GetTeamHistory().GetTotalPodium() > i_b->GetTeamHistory().GetTotalPodium();
}

inline bool TeamComparisonTotalTeamPoints(const Team* const i_a, const Team* const i_b)
{
	return i_a->GetTeamPoints(0) > i_b->GetTeamPoints(0);
}

inline bool TeamComparisonRecentTeamPoints(const Team* const i_a, const Team* const i_b)
{
	return i_a->GetTeamPoints(5) > i_b->GetTeamPoints(5);
}

struct TeamComparisonHistoryPodium
{
	explicit TeamComparisonHistoryPodium(const int i_pos):m_pos(i_pos){}
	bool operator()(const Team* const i_a, const Team* const i_b)
	{
		return i_a->GetTeamHistory().GetPodium()[m_pos] > i_b->GetTeamHistory().GetPodium()[m_pos];
	}
	int m_pos;
};

